package com.google.sydym6.view.adapters;

import java.util.ArrayList;
import java.util.List;

import com.google.sydym6.view.fragments.CatalogPageFragment;
import com.google.sydym6.view.fragments.FavouritesPageFragment;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

public class RadioListPagerAdapter extends FragmentPagerAdapter {
	
	static final int PAGE_COUNT = 2;
	List<Fragment> radioListsFragments;
	
	public RadioListPagerAdapter(FragmentManager fm) {
		super(fm);
		radioListsFragments = new ArrayList<Fragment>();
		radioListsFragments.add(FavouritesPageFragment.newInstance());
		radioListsFragments.add(CatalogPageFragment.newInstance());
	}

	@Override
	public Fragment getItem(int position) {
		return radioListsFragments.get(position);
	}
	
	@Override
	public int getCount() {
		return PAGE_COUNT;
	}
}
